import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooMinishopOrderExpressLogController } from '../../../controllers';
const uctoominishopOrderExpressLogRouter = new Router();
const minishopOrderExpressLogController = new uctooMinishopOrderExpressLogController();

uctoominishopOrderExpressLogRouter.post('/add', requireUser, minishopOrderExpressLogController.add);
uctoominishopOrderExpressLogRouter.post('/edit', requireUser, rowLevelPermission('uctoo/minishop_order_express_log'), minishopOrderExpressLogController.edit);
uctoominishopOrderExpressLogRouter.post('/del', requireUser, rowLevelPermission('uctoo/minishop_order_express_log'), minishopOrderExpressLogController.delete);

//For getting minishopOrderExpressLog with permission control
uctoominishopOrderExpressLogRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/minishop_order_express_log'), minishopOrderExpressLogController.getSingle);
uctoominishopOrderExpressLogRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/minishop_order_express_log'), minishopOrderExpressLogController.getMany);
uctoominishopOrderExpressLogRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/minishop_order_express_log'), minishopOrderExpressLogController.getMany);

//#endregion AutoCreateCode
export default uctoominishopOrderExpressLogRouter;
